layui.use(['table'], function (data) {
    var table = layui.table;


    table.render({
        elem: "#produceQualityHistory",
        height: 'full-125',
        url: ctx + '/quality/selectByParamsWithProduceQualityHistory',
        page: true,
        cellMinWidth: 80, // 单元格最小宽度
        toolbar: '#toolbarDemo',
        cols: [[// 表头
            {type: 'checkbox'},
            {type: "numbers"},
            {
                title: "质检单号", field: "qualityNo"
            },
            {
                title: "项目单号", field: "projectNo", templet: function (data) {
                    return data.projectBean.projectNo
                }
            },
            {
                title: "产品名称", field: "productName", templet: function (data) {
                    return data.projectBean.basicQuotationBean.productName;
                }
            },
            {
                title: "产品数量", field: "productCount", templet: function (data) {
                    return data.projectBean.basicQuotationBean.productCount;
                }
            },
            {
              title: "质检时间" , field: "qualityData"
            },
            {
                title: "质检员", field: "qualityerId", templet: function (data) {
                    return data.empBean.empName
                }
            },
            {
                title: "质检结果", field: "qualityResult", templet: function (data) {
                    if (data.qualityResult == 0) {
                        return "合格"
                    } else if (data.qualityResult == 1) {
                        return "不合格"
                    }
                }
            } ,
            {
                title: "描述" , field: "qualityDescribe"
            }


        ]]
    })


})